@layout("/backend/common/_container.html"){
<#Hidden id="dataId" value="${data!}"/>
<body style="background-color:white;padding:20px;">
    <div style="float:left;" id="Alias"></div>
    <div id="QCRatio"></div>
</body>
<script language="javascript" type="text/javascript">
    var obj = new Object();
    var QCRows = $("#dataId").val();
    var data = JSON.parse(QCRows);
    //根据报告信息+查询参数，计算病种展现信息
    var QCRows = data.aRatioData
    var QCLength = QCRows.length, columns = 4, listHtml = "<div>"
    var per = Math.round((1 / columns) * 90) + '%';   //每列所在百分比
    var count = parseInt(QCLength / columns) + 1;
    for (var index = 0; index < count; index++) {		//行遍历
        var listlen = (((index + 1) * columns) < QCLength) ? (index + 1) * columns : QCLength;
        listHtml += "<div style='padding:10px'>";
        for (var qcIndex = index * columns; qcIndex < listlen; qcIndex++) { //对应行数据输出
            var qcobj = QCRows[qcIndex];
            listHtml += " <div style='border:1px solid #ccc;border-radius:5px;margin-right:10px;padding:3px;text-align:left;float:left;width:" + per + "' >"
            listHtml += " <p style='margin: 5px 0 10px 0;font-weight:bold;'>"+" "+qcobj.code+"</p>";
            listHtml += "<div>"
            listHtml += "<img style='float: left;border-radius: 10px;'  src='/static/common/img/sds/"+qcobj.description+".png' width='70px' height='70px' />"
            listHtml += " <div style='float: left;margin-left: 15px;'>";
            listHtml += " <p style='margin:0 0 10px 0;'>自动提取率：<a style='cursor:pointer' onmouseover='obj.showRatioAlias(\""+qcobj.ids+"\");'><span>"+qcobj.aRatio+"%</span></a></p>";
            listHtml += " </div>";
            listHtml += "</div>"
            listHtml += "</div>";
        }
        listHtml += "</div>"
        listHtml += "<div style='clear:both'></div>"
    }
    listHtml += "</div>"
    $('#QCRatio').html(listHtml);
    obj.showRatioAlias=function(mrid){
        var params = {};
        var ajax = new $ax(Sys.backendPath + "/analysis/portal/getAutoAlias", function (data) {
            var aliasHtml=""
            aliasHtml+='<p><a class="icon icon-ok">&nbsp;&nbsp;&nbsp;</a><span style="display:inline-block;width:120px;">自动采集项目数</span>'+data.aCount+'</p>'
            aliasHtml+='<p><a class="icon icon-write-order">&nbsp;&nbsp;&nbsp;</a><span style="display:inline-block;width:120px;">应填项目总数</span>'+data.nCount+'</p>'
            aliasHtml+='<p><span class="icon icon-book-green">&nbsp;&nbsp;&nbsp;</span><a style="cursor:pointer;" onClick="obj.showform(\'' + data.id + '\');">查看表单情况<a></p>'
            var event = event || window.event;
            $("#Alias").webuiPopover('destroy');
            $HUI.popover('#Alias',{
                width:'220px',
                height:'100px',
                content:aliasHtml,
                placement:'bottom',
                cache:false,
                type:'html',
                offsetTop:event.clientY-10,
                offsetLeft:event.clientX-10
            });
            $("#Alias").popover('show');
        }, function (data){
        });
        params.mrid = mrid;
        ajax.set(params);
        ajax.start();
    }
    obj.showform=function(mrid){
        var index = Sys.open_c('病种入组病例详情', '/sds/sdsqcformshow?mrListId=' + mrid+ '&checkPerm=' + 1, null, function (){
        });
        this.layerIndex = index;
    }
    $.parser.parse(); //解析元素样式
</script>
@}